﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace CLEX.DataContracts
{
    [DataContract]
    public class UserFullData
    {
        [DataMember]
        public int UserId { get; set; }

        [DataMember]
        public string Username { get; set; }

        [DataMember]
        public string HashedPassword { get; set; }

        [DataMember]
        public string PasswordSalt { get; set; }

        [DataMember]
        public string Email { get; set; }

        [DataMember]
        public bool IsAdmin { get; set; }

        public UserFullData(UserData user, string hashedPassword, string passworSalt)
        {
            UserId = user.UserId;
            Username = user.Username;
            Email = user.Email;
            IsAdmin = user.IsAdmin;
            HashedPassword = hashedPassword;
            PasswordSalt = passworSalt;
        }

        public UserFullData()
        {
        }
    }
}